import logging
import sqlite3
import time
def row1(cursor, row):
    return [row[0],row[1],round((time.time()-row[2])/(24*3600),4)]
if __name__=="__main__":
    logging.basicConfig(level=logging.INFO)
    db=sqlite3.connect(r"e:\blake2.log.db",check_same_thread=False)
    cur1=db.cursor()
    cur2=db.cursor()
    cur1.row_factory=row1
    r=cur1.execute("select * from checks limit 0,3")
    r=r.fetchall()
    for i in r:
        logging.info(i)
    r=cur2.execute("select * from checks limit 0,3")
    r=r.fetchall()
    for i in r:
        logging.info(i)